class PesquisarSalaController < ApplicationController
	
	def index
	end

	def recurso
		@predios = Predio.find(:all, :order => "nome")
		@recursos = Recurso.find(:all,:order => "nome")

		if !params[:recurso_id].blank? and !params[:predio_id].blank?

			@recurso = Recurso.find(params[:recurso_id])
			if !@recurso.blank?

				@recurso_sala = RecursoSala.find(:all,:conditions => ["recurso_id = ?", @recurso.id])

				@salas = Salasdeaula.find(:all, :conditions => ["predio_id = ?", params[:predio_id]])
			end

		end
	end
end
